using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Cirrious.MvvmCross.Binding.Droid.Views;
using Cirrious.MvvmCross.Interfaces.ViewModels;
using Conference.Core.UX.ViewModels;

namespace Conference.UX.DroidPhone.Views
{
    public class MainView : MvxBindingTabActivityView<MainViewModel>
    {
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Main);

            TabHost.TabSpec spec;     // Resusable TabSpec for each tab
            Intent intent;            // Reusable Intent for each tab

            // Initialize a TabSpec for each tab and add it to the TabHost

            spec = TabHost.NewTabSpec("sessions");
            spec.SetIndicator("Sessions");
            //spec.SetIndicator(this.GetText("Sessions"), Resources.GetDrawable(Resource.Drawable.Tab_Sessions));
            spec.SetContent(CreateIntentFor(ViewModel.Sessions));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("speakers");
            spec.SetIndicator("Speakers");
            //spec.SetIndicator(this.GetText("Speakers"), Resources.GetDrawable(Resource.Drawable.Tab_Speakers));
            spec.SetContent(CreateIntentFor(ViewModel.Speakers));
            TabHost.AddTab(spec);

        }
    }
}